import {
  request
} from '../network/request.js';
// 获取设置列表
export function getUserset(type) {
  return new Promise((re, rj) => {
    request({
      url: "/userSet",
      data: {
        type: type
      }
    }).then(res => re(res), err => rj(err))
  })
}
// 设置消息
export function getSetlist(type) {
  return new Promise((re, rj) => {
    request({
      url: "/userSetint/1",
      data: {
        type: type
      }
    }).then(res => re(res), err => rj(err))
  })
}
// 自动回复
export function gethuifu(type) {
  return new Promise((re, rj) => {
    request({
      url: "/userSetint/2",
      data: {
        type: type
      }
    }).then(res => re(res), err => rj(err))
  })
}
// 系统权限
export function getxitong(type) {
  return new Promise((re, rj) => {
    request({
      url: "/userSetint/3",
      data: {
        type: type
      }
    }).then(res => re(res), err => rj(err))
  })
}
// 安全中心
export function getanquan(type) {
  return new Promise((re, rj) => {
    request({
      url: "/userSetint/4",
      data: {
        type: type
      }
    }).then(res => re(res), err => rj(err))
  })
}
// 我的保护
export function getbaohu(type) {
  // console.log(type);
  return new Promise((re, rj) => {
    request({
      url: "/useranquan/1",
      data: {
        type: type
      }
    }).then(res => re(res), err => rj(err))
  })
}
// 设备管理
export function getshebei(type) {
  // console.log(type);
  return new Promise((re, rj) => {
    request({
      url: "/useranquan/2",
      data: {
        type: type
      }
    }).then(res => re(res), err => rj(err))
  })
}
// 锁定账号
export function getsuoding(type) {
  // console.log(type);
  return new Promise((re, rj) => {
    request({
      url: "/useranquan/3",
      data: {
        type: type
      }
    }).then(res => re(res), err => rj(err))
  })
}
// 违规记录
export function getweigui(type) {
  // console.log(type);
  return new Promise((re, rj) => {
    request({
      url: "/useranquan/4",
      data: {
        type: type
      }
    }).then(res => re(res), err => rj(err))
  })
}
// 修改消息设置
export function Setxiaoxi(type) {
  console.log(type);
  return new Promise((re, rj) => {
    request({
      url: `/userSetint/1`,
      method: "PUT",
      data: {
        type: type
      }
    }).then(res => re(res), err => rj(err))
  })
}
